class Ticket
    VENUES =["Convention Center","Fairgrounds","Town Hall"]
    attr_reader :venue, :date
    attr_accessor :price

    def initialize(venue,date)
        if VENUES.include?(venue)
            @venue=venue
        else
            #抛出一个异常，致命错误
            raise ArgumentError, "Unknown venue #{venue}"
        end
        @date = date
    end
end

temp = Ticket.new("Fairgrounds","2024-06-01")
puts Ticket::VENUES
venues = Ticket::VENUES
venues << "High School Gym"
puts Ticket::VENUES